﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Utils;

namespace System
{
    public static class OtherExt
    {
        /// <summary>
        /// Returns true if value == DefaultBoolean.True or value == DefaultBoolean.Default && defaultValue == true
        /// </summary>
        /// <param name="value"></param>
        /// <param name="defaultValue"></param>
        /// <returns></returns>
        public static bool IsTrue(this DefaultBoolean value, bool defaultValue)
        {
            return value == DefaultBoolean.True || 
                (value == DefaultBoolean.Default && defaultValue);
        }
    }
}
